<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="javax.xml.ws.Dispatch"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Registrar Usuario</title>

<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="../css/jquery.ketchup.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="../css/registro.css" />
    
       <script type="text/javascript" src="../js/jquery.ketchup.validations.basic.js"></script>
    <script type="text/javascript" src="../js/main.js"></script>
<script src="../js/validarUsuarios.js"></script>
</head>
<body>

<% 
	if(session.getAttribute("session.priv")!=null){
	response.sendRedirect("FrontController?res=perfil/perfilUsuario.jsp");
	}
 
Object ologin = session.getAttribute("session.loginform");
Object oemail = session.getAttribute("session.emailform");
String login = "";
String email ="";
if(ologin!=null){
	login = (String)ologin;
}
if(oemail!=null){
	email = (String)oemail;
}
%>
<ul id="toc">
      <li><a href="FrontController?res=control/content.jsp">Saltar a inicio</a></li>
    </ul>
    <h1>Paso 1 - Create una cuenta en inverSide</h1>
    <div id="wrapper">
      
      <h2>Nuevo usuario</h2>

<form method="post" action="validarUsuario.jsp">

<label id="label_nick" for="nick"> Login:</label> 
<input type="text" size="20" name="login" id="login" value="<%=login %>" onKeyUp="validaUsuario()" /> 
<div id="usuario_valido"><p></p></div>

<label id="label_pwd" for="pwd"> Password:</label>
 <input type="password" size="20" name="password" id="password" />
 
<label id="label_pwd" for="pwd"> Repita el password:</label>
 <input type="password" size="20" name="password2" id="password2" />

<label id="label_email" for="email"> Email:</label> 
<input type="text" 	size="20" name="email" id="email" value="<%=email %>"/> 

<input type="submit" value="Siguiente paso" name="botonPaso1" class="submit"/></form>
 </div>
<%
	if ((request.getParameter("erroresUsuario") != null)) {
		String errores = request.getParameter("erroresUsuario");
		//out.println(errores.substring(1, errores.length() - 1));
		%>
		<div class="error"><%
		out.println(errores.substring(1, errores.length() - 1));
		errores=null;
		%></div>
		<%
		
	}

%>

</body>
</html>